<!-- HTML header for doxygen 1.8.20-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=9"/>
	<meta name="generator" content="Doxygen 1.9.4"/>
	<meta name="viewport" content="width=device-width, initial-scale=1"/>
	<title>Raspberry Pi Pico SDK: hardware_exception</title>
	<!-- <link href="tabs.css" rel="stylesheet" type="text/css"/> -->
	<script type="text/javascript" src="jquery.js"></script>
	<script type="text/javascript" src="dynsections.js"></script>
	<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
	<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
	<link href="doxygen.css" rel="stylesheet" type="text/css" />
	<link href="normalise.css" rel="stylesheet" type="text/css"/>
<link href="main.css" rel="stylesheet" type="text/css"/>
<link href="styles.css" rel="stylesheet" type="text/css"/>
</head>
<body>
	<div class="navigation-mobile">
		<div class="logo--mobile">
			<a href="/"><img src="logo-mobile.svg" alt="Raspberry Pi"></a>
		</div>
		<div class="navigation-toggle">
			<span class="line-1"></span>
			<span class="line-2">
				<p>Menu Toggle</p>
			</span>
			<span class="line-3"></span>
		</div>
	</div>
	<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
		<div class="logo">
			<a href="index.html"> <img src="logo.svg" alt="Raspberry Pi"></a>
			<span style="display: inline-block; margin-top: 10px;">
				v2.0.0
			</span>
		</div>
		<div class="navigation-footer">
			<img src="logo-mobile.svg" alt="Raspberry Pi">
			<a href="https://www.raspberrypi.com/" target="_blank">By Raspberry Pi Ltd</a>
		</div>
<!-- 		<div class="search">
			<form>
				<input type="search" name="search" id="search" placeholder="Search">
				<input type="submit" value="Search">
			</form>
		</div> -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('group__hardware__exception.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">hardware_exception<div class="ingroups"><a class="el" href="group__hardware.html">Hardware APIs</a></div></div></div>
</div><!--header-->
<div class="contents">

<p>Methods for setting processor exception handlers.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga4de8b8ce1d704966edfc547190f73f0b"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__exception.html#ga4de8b8ce1d704966edfc547190f73f0b">exception_handler_t</a>) (void)</td></tr>
<tr class="memdesc:ga4de8b8ce1d704966edfc547190f73f0b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Exception handler function type.  <a href="group__hardware__exception.html#ga4de8b8ce1d704966edfc547190f73f0b">More...</a><br /></td></tr>
<tr class="separator:ga4de8b8ce1d704966edfc547190f73f0b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="enum-members" name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga504f1c3a5a6959d430665f5d72cf335a"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__exception.html#ga504f1c3a5a6959d430665f5d72cf335a">exception_number</a> { <br />
&#160;&#160;<b>MIN_EXCEPTION_NUM</b> = 2
, <a class="el" href="group__hardware__exception.html#gga504f1c3a5a6959d430665f5d72cf335aa6e8a4e796361d59517c80affc6e93cd7">NMI_EXCEPTION</a> = 2
, <a class="el" href="group__hardware__exception.html#gga504f1c3a5a6959d430665f5d72cf335aadf88404244d6cf50e5103848de3892e2">HARDFAULT_EXCEPTION</a> = 3
, <a class="el" href="group__hardware__exception.html#gga504f1c3a5a6959d430665f5d72cf335aa1e7d691476a041fb59915e046e85d586">SVCALL_EXCEPTION</a> = 11
, <br />
&#160;&#160;<a class="el" href="group__hardware__exception.html#gga504f1c3a5a6959d430665f5d72cf335aae6e5980728dbb2ff717a7867bdb25a3a">PENDSV_EXCEPTION</a> = 14
, <a class="el" href="group__hardware__exception.html#gga504f1c3a5a6959d430665f5d72cf335aa05ced3409f791060c7eab53bc557c333">SYSTICK_EXCEPTION</a> = 15
, <b>MAX_EXCEPTION_NUM</b> = 15
<br />
 }</td></tr>
<tr class="memdesc:ga504f1c3a5a6959d430665f5d72cf335a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Exception number definitions.  <a href="group__hardware__exception.html#ga504f1c3a5a6959d430665f5d72cf335a">More...</a><br /></td></tr>
<tr class="separator:ga504f1c3a5a6959d430665f5d72cf335a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga0c49b97eb751230b3d77459e7bfe98f5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__hardware__exception.html#ga4de8b8ce1d704966edfc547190f73f0b">exception_handler_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__exception.html#ga0c49b97eb751230b3d77459e7bfe98f5">exception_set_exclusive_handler</a> (enum <a class="el" href="group__hardware__exception.html#ga504f1c3a5a6959d430665f5d72cf335a">exception_number</a> num, <a class="el" href="group__hardware__exception.html#ga4de8b8ce1d704966edfc547190f73f0b">exception_handler_t</a> handler)</td></tr>
<tr class="memdesc:ga0c49b97eb751230b3d77459e7bfe98f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the exception handler for an exception on the executing core.  <a href="group__hardware__exception.html#ga0c49b97eb751230b3d77459e7bfe98f5">More...</a><br /></td></tr>
<tr class="separator:ga0c49b97eb751230b3d77459e7bfe98f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabd73e0f58d5d1149a77a521c0dceb9cb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__exception.html#gabd73e0f58d5d1149a77a521c0dceb9cb">exception_restore_handler</a> (enum <a class="el" href="group__hardware__exception.html#ga504f1c3a5a6959d430665f5d72cf335a">exception_number</a> num, <a class="el" href="group__hardware__exception.html#ga4de8b8ce1d704966edfc547190f73f0b">exception_handler_t</a> original_handler)</td></tr>
<tr class="memdesc:gabd73e0f58d5d1149a77a521c0dceb9cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Restore the original exception handler for an exception on this core.  <a href="group__hardware__exception.html#gabd73e0f58d5d1149a77a521c0dceb9cb">More...</a><br /></td></tr>
<tr class="separator:gabd73e0f58d5d1149a77a521c0dceb9cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga51b870aeeca94e21bd35bdfbab20e706"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__hardware__exception.html#ga4de8b8ce1d704966edfc547190f73f0b">exception_handler_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__exception.html#ga51b870aeeca94e21bd35bdfbab20e706">exception_get_vtable_handler</a> (enum <a class="el" href="group__hardware__exception.html#ga504f1c3a5a6959d430665f5d72cf335a">exception_number</a> num)</td></tr>
<tr class="memdesc:ga51b870aeeca94e21bd35bdfbab20e706"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current exception handler for the specified exception from the currently installed vector table of the execution core.  <a href="group__hardware__exception.html#ga51b870aeeca94e21bd35bdfbab20e706">More...</a><br /></td></tr>
<tr class="separator:ga51b870aeeca94e21bd35bdfbab20e706"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6567fefaab2f557e12796f8d57bec124"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__exception.html#ga6567fefaab2f557e12796f8d57bec124">exception_set_priority</a> (uint num, uint8_t hardware_priority)</td></tr>
<tr class="memdesc:ga6567fefaab2f557e12796f8d57bec124"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set specified exception's priority.  <a href="group__hardware__exception.html#ga6567fefaab2f557e12796f8d57bec124">More...</a><br /></td></tr>
<tr class="separator:ga6567fefaab2f557e12796f8d57bec124"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7189f5bb3db0bf08c76cb79c1235a71a"><td class="memItemLeft" align="right" valign="top">uint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__exception.html#ga7189f5bb3db0bf08c76cb79c1235a71a">exception_get_priority</a> (uint num)</td></tr>
<tr class="memdesc:ga7189f5bb3db0bf08c76cb79c1235a71a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get specified exception's priority.  <a href="group__hardware__exception.html#ga7189f5bb3db0bf08c76cb79c1235a71a">More...</a><br /></td></tr>
<tr class="separator:ga7189f5bb3db0bf08c76cb79c1235a71a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p >Methods for setting processor exception handlers. </p>
<p >Exceptions are identified by a <a class="el" href="group__hardware__exception.html#ga504f1c3a5a6959d430665f5d72cf335a">exception_number</a> which is a number from -15 to -1; these are the numbers relative to the index of the first IRQ vector in the vector table. (i.e. vector table index is exception_num plus 16)</p>
<p >There is one set of exception handlers per core, so the exception handlers for each core as set by these methods are independent.</p>
<dl class="section note"><dt>Note</dt><dd>That all exception APIs affect the executing core only (i.e. the core calling the function). </dd></dl>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="ga4de8b8ce1d704966edfc547190f73f0b" name="ga4de8b8ce1d704966edfc547190f73f0b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4de8b8ce1d704966edfc547190f73f0b">&#9670;&nbsp;</a></span>exception_handler_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(* exception_handler_t) (void)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Exception handler function type. </p>
<p >All exception handlers should be of this type, and follow normal ARM EABI register saving conventions </p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="ga504f1c3a5a6959d430665f5d72cf335a" name="ga504f1c3a5a6959d430665f5d72cf335a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga504f1c3a5a6959d430665f5d72cf335a">&#9670;&nbsp;</a></span>exception_number</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__hardware__exception.html#ga504f1c3a5a6959d430665f5d72cf335a">exception_number</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Exception number definitions. </p>
<p >On Arm these are vector table indices:</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Name   </th><th class="markdownTableHeadNone">Value   </th><th class="markdownTableHeadNone">Exception    </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">NMI_EXCEPTION   </td><td class="markdownTableBodyNone">2   </td><td class="markdownTableBodyNone">Non Maskable Interrupt    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">HARDFAULT_EXCEPTION   </td><td class="markdownTableBodyNone">3   </td><td class="markdownTableBodyNone">HardFault    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">SVCALL_EXCEPTION   </td><td class="markdownTableBodyNone">11   </td><td class="markdownTableBodyNone">SV Call    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">PENDSV_EXCEPTION   </td><td class="markdownTableBodyNone">14   </td><td class="markdownTableBodyNone">Pend SV    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">SYSTICK_EXCEPTION   </td><td class="markdownTableBodyNone">15   </td><td class="markdownTableBodyNone">System Tick   </td></tr>
</table>
<p >On RISC-V these are exception cause numbers:</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Name   </th><th class="markdownTableHeadNone">Value   </th><th class="markdownTableHeadNone">Exception    </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">INSTR_ALIGN_EXCEPTION   </td><td class="markdownTableBodyNone">0   </td><td class="markdownTableBodyNone">Instruction fetch misaligned    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">INSTR_FAULT_EXCEPTION   </td><td class="markdownTableBodyNone">1   </td><td class="markdownTableBodyNone">Instruction fetch bus fault    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">INSTR_ILLEGAL_EXCEPTION   </td><td class="markdownTableBodyNone">2   </td><td class="markdownTableBodyNone">Invalid or illegal instruction    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">EBREAK_EXCEPTION   </td><td class="markdownTableBodyNone">3   </td><td class="markdownTableBodyNone">ebreak was not caught by an ex    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">LOAD_ALIGN_EXCEPTION   </td><td class="markdownTableBodyNone">4   </td><td class="markdownTableBodyNone">Load address not naturally ali    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">LOAD_FAULT_EXCEPTION   </td><td class="markdownTableBodyNone">5   </td><td class="markdownTableBodyNone">Load bus fault    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">STORE_ALIGN_EXCEPTION   </td><td class="markdownTableBodyNone">6   </td><td class="markdownTableBodyNone">Store or AMO address not natur    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">STORE_FAULT_EXCEPTION   </td><td class="markdownTableBodyNone">7   </td><td class="markdownTableBodyNone">Store or AMO bus fault    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">ECALL_UMODE_EXCEPTION   </td><td class="markdownTableBodyNone">8   </td><td class="markdownTableBodyNone">ecall was executed in U-mode    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">ECALL_SMODE_EXCEPTION   </td><td class="markdownTableBodyNone">9   </td><td class="markdownTableBodyNone">ecall was executed in S-mode    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">ECALL_MMODE_EXCEPTION   </td><td class="markdownTableBodyNone">11   </td><td class="markdownTableBodyNone">ecall was executed in M-mode   </td></tr>
</table>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga504f1c3a5a6959d430665f5d72cf335aa6e8a4e796361d59517c80affc6e93cd7" name="gga504f1c3a5a6959d430665f5d72cf335aa6e8a4e796361d59517c80affc6e93cd7"></a>NMI_EXCEPTION&#160;</td><td class="fielddoc"><p >Non Maskable Interrupt. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga504f1c3a5a6959d430665f5d72cf335aadf88404244d6cf50e5103848de3892e2" name="gga504f1c3a5a6959d430665f5d72cf335aadf88404244d6cf50e5103848de3892e2"></a>HARDFAULT_EXCEPTION&#160;</td><td class="fielddoc"><p >HardFault Interrupt. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga504f1c3a5a6959d430665f5d72cf335aa1e7d691476a041fb59915e046e85d586" name="gga504f1c3a5a6959d430665f5d72cf335aa1e7d691476a041fb59915e046e85d586"></a>SVCALL_EXCEPTION&#160;</td><td class="fielddoc"><p >SV Call Interrupt. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga504f1c3a5a6959d430665f5d72cf335aae6e5980728dbb2ff717a7867bdb25a3a" name="gga504f1c3a5a6959d430665f5d72cf335aae6e5980728dbb2ff717a7867bdb25a3a"></a>PENDSV_EXCEPTION&#160;</td><td class="fielddoc"><p >Pend SV Interrupt. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga504f1c3a5a6959d430665f5d72cf335aa05ced3409f791060c7eab53bc557c333" name="gga504f1c3a5a6959d430665f5d72cf335aa05ced3409f791060c7eab53bc557c333"></a>SYSTICK_EXCEPTION&#160;</td><td class="fielddoc"><p >System Tick Interrupt. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga7189f5bb3db0bf08c76cb79c1235a71a" name="ga7189f5bb3db0bf08c76cb79c1235a71a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7189f5bb3db0bf08c76cb79c1235a71a">&#9670;&nbsp;</a></span>exception_get_priority()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint exception_get_priority </td>
          <td>(</td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>num</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get specified exception's priority. </p>
<p >Numerically-lower values indicate a higher priority. Hardware priorities range from 0 (highest priority) to 255 (lowest priority).</p>
<p >Only the top 2 bits are significant on ARM Cortex-M0+ on RP2040. </p>
<p >Only the top 4 bits are significant on ARM Cortex-M33 on RP2350, and exception priorities are not supported on RISC-V </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">num</td><td>Exception number <a class="el" href="group__hardware__exception.html#ga504f1c3a5a6959d430665f5d72cf335a">exception_number</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the exception priority </dd></dl>

</div>
</div>
<a id="ga51b870aeeca94e21bd35bdfbab20e706" name="ga51b870aeeca94e21bd35bdfbab20e706"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga51b870aeeca94e21bd35bdfbab20e706">&#9670;&nbsp;</a></span>exception_get_vtable_handler()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__hardware__exception.html#ga4de8b8ce1d704966edfc547190f73f0b">exception_handler_t</a> exception_get_vtable_handler </td>
          <td>(</td>
          <td class="paramtype">enum <a class="el" href="group__hardware__exception.html#ga504f1c3a5a6959d430665f5d72cf335a">exception_number</a>&#160;</td>
          <td class="paramname"><em>num</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the current exception handler for the specified exception from the currently installed vector table of the execution core. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">num</td><td>Exception number </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the address stored in the VTABLE for the given exception number </dd></dl>

</div>
</div>
<a id="gabd73e0f58d5d1149a77a521c0dceb9cb" name="gabd73e0f58d5d1149a77a521c0dceb9cb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabd73e0f58d5d1149a77a521c0dceb9cb">&#9670;&nbsp;</a></span>exception_restore_handler()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void exception_restore_handler </td>
          <td>(</td>
          <td class="paramtype">enum <a class="el" href="group__hardware__exception.html#ga504f1c3a5a6959d430665f5d72cf335a">exception_number</a>&#160;</td>
          <td class="paramname"><em>num</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__hardware__exception.html#ga4de8b8ce1d704966edfc547190f73f0b">exception_handler_t</a>&#160;</td>
          <td class="paramname"><em>original_handler</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Restore the original exception handler for an exception on this core. </p>
<p >This method may be used to restore the exception handler for an exception on this core to the state prior to the call to <a class="el" href="group__hardware__exception.html#ga0c49b97eb751230b3d77459e7bfe98f5" title="Set the exception handler for an exception on the executing core.">exception_set_exclusive_handler()</a>, so that <a class="el" href="group__hardware__exception.html#ga0c49b97eb751230b3d77459e7bfe98f5" title="Set the exception handler for an exception on the executing core.">exception_set_exclusive_handler()</a> may be called again in the future.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">num</td><td>Exception number <a class="el" href="group__hardware__exception.html#ga504f1c3a5a6959d430665f5d72cf335a">exception_number</a> </td></tr>
    <tr><td class="paramname">original_handler</td><td>The original handler returned from <a class="el" href="group__hardware__exception.html#ga0c49b97eb751230b3d77459e7bfe98f5">exception_set_exclusive_handler</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__hardware__exception.html#ga0c49b97eb751230b3d77459e7bfe98f5" title="Set the exception handler for an exception on the executing core.">exception_set_exclusive_handler()</a> </dd></dl>

</div>
</div>
<a id="ga0c49b97eb751230b3d77459e7bfe98f5" name="ga0c49b97eb751230b3d77459e7bfe98f5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0c49b97eb751230b3d77459e7bfe98f5">&#9670;&nbsp;</a></span>exception_set_exclusive_handler()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__hardware__exception.html#ga4de8b8ce1d704966edfc547190f73f0b">exception_handler_t</a> exception_set_exclusive_handler </td>
          <td>(</td>
          <td class="paramtype">enum <a class="el" href="group__hardware__exception.html#ga504f1c3a5a6959d430665f5d72cf335a">exception_number</a>&#160;</td>
          <td class="paramname"><em>num</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__hardware__exception.html#ga4de8b8ce1d704966edfc547190f73f0b">exception_handler_t</a>&#160;</td>
          <td class="paramname"><em>handler</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the exception handler for an exception on the executing core. </p>
<p >This method will assert if an exception handler has been set for this exception number on this core via this method, without an intervening restore via exception_restore_handler.</p>
<dl class="section note"><dt>Note</dt><dd>this method may not be used to override an exception handler that was specified at link time by providing a strong replacement for the weakly defined stub exception handlers. It will assert in this case too.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">num</td><td>Exception number </td></tr>
    <tr><td class="paramname">handler</td><td>The handler to set </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__hardware__exception.html#ga504f1c3a5a6959d430665f5d72cf335a" title="Exception number definitions.">exception_number</a> </dd></dl>

</div>
</div>
<a id="ga6567fefaab2f557e12796f8d57bec124" name="ga6567fefaab2f557e12796f8d57bec124"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6567fefaab2f557e12796f8d57bec124">&#9670;&nbsp;</a></span>exception_set_priority()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool exception_set_priority </td>
          <td>(</td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>num</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>hardware_priority</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set specified exception's priority. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">num</td><td>Exception number <a class="el" href="group__hardware__exception.html#ga504f1c3a5a6959d430665f5d72cf335a">exception_number</a> </td></tr>
    <tr><td class="paramname">hardware_priority</td><td>Priority to set.</td></tr>
  </table>
  </dd>
</dl>
<p>Numerically-lower values indicate a higher priority. Hardware priorities range from 0 (highest priority) to 255 (lowest priority).</p>
<p >Only the top 2 bits are significant on ARM Cortex-M0+ on RP2040. </p>
<p >Only the top 4 bits are significant on ARM Cortex-M33 on RP2350, and exception priorities are not supported on RISC-V  </p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->

	<script src="main.js"></script>
</body>
</html>